<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            background: url(bg.jpg) no-repeat;
            background-size: 100% 100%;
        }
        a{
            text-decoration: none;
            color:#a8d82b;
        }
        .login{
            padding:10px 30px;
        }
        /* logo */
        .logo{
            padding-top:100px;
            text-align: center;
        }
        .logo img{
            width: 80px;
        }
        /* 登录 */
        .login-model{
            margin-top:50px;
        }
        .box-wrapper{
            background: url(user-name.png) no-repeat left center;
            background-size: 24px;
            padding-left:30px;
            margin-top:30px;
        }
        .box{
            background: none;
            border:none;
            border-bottom: solid 1px #ddd;
            padding:8px 0;
            width: 100%;
            outline: none;
        }
        /* 忘记密码 */
        .forget{
            text-align: right;
            margin-top:10px;
        }
        .forget a{
            color:#ccc;
            font-size:13px;
        }
        button{
            background: #a8d82b;
            border:none;
            width: 100%;
            padding:10px 0;
            border-radius: 30px;
            color:#fff;
            outline: none;
            margin: 20px 0;
        }
        button:active{
            background-color: #83aa22;
        }
        .reg{
            text-align: center;
        }
        /* 第三方账号 */
        .other-login{
            margin-top:70px;
        }
        .title{
            display: flex;
        }
        .title .line{
            border-bottom:solid 1px #ddd;
            flex:1;
            position: relative;
            top:-8px;
        }
        .title .text{
            font-size: 13px;
            color:#ccc;
            padding:0 10px;
        }
        .methods{
            text-align: center;
            padding-top:20px;
        }
        .wechat{
            float:left;
            width: 36px;
        }
        .qq{
            width: 28px;
        }
        .weibo{
            float:right;
            width: 32px;
        }
    </style>
</head>

<body>
    <div class="login">
        <div class="logo">
            <img src="logo.png" alt="">
        </div>
        <div class="login-model">
            <div class="box-wrapper">
                <input type="text" id="username" class="box" placeholder="请输入用户名" />
            </div>
            <div class="box-wrapper" style="background-image:url(password.png)">
                <input type="password" id="password" class="box" placeholder="请输入密码" />
            </div>
            <div class="forget">
                <a href="#">忘记密码?</a>
            </div>
            <button onclick="checkLogin()" type="button">登录</button>
            <div class="reg">
                <span>还没有账号?</span>
                <a href="#">立即注册</a>
            </div>
        </div>
        <div class="other-login">
            <div class="title">
                <div class="line"></div>
                <div class="text">第三方账号登录</div>
                <div class="line"></div>
            </div>
            <div class="methods">
                <img class="wechat" src="wechat.png" alt="">
                <img class="qq" src="qq.png" alt="">
                <img class="weibo" src="weibo.png" alt="">
            </div>
        </div>
    </div>
    <script>
        function checkLogin(){
            // 获取用户和密码的输入框
            var user = document.getElementById('username');
            var pwd  = document.getElementById('password');
            if(user.value == 'admin' && pwd.value == 'admin'){
                alert('登录成功')
            }else{
                alert('登录失败,用户名或密码错误')
            }
        }
    </script>
</body>

</html>